﻿using ConfExpert.Forms.Base;
using DevTeam;
using System;

namespace ConfExpert.Forms.Depo.Kauf
{
    public partial class TelaFarkOranı : XForm
    {
        int CustomerId;
        public TelaFarkOranı(int CustomerId )
        {
            this.CustomerId = CustomerId;
            InitializeComponent();
        }

        private void TelaFarkOranı_Load(object sender, EventArgs e)
        {
            this.Text = "Tela Fazla Çıkış Oranı";
            
            gvTelaFAO.Init("GetTelaFarkOranı",CustomerId);
            gvTelaFAO.MakeColumnsReadOnly("CustomerId");
            gvTelaFAO.MakeColumnInvisible("TelaFAOId");
            gvTelaFAO.BestFitColumns();
            barButtonItem1.ItemClick += barButtonItem1_ItemClick;      
        }

        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            gvTelaFAO.EndEditing();
            gvTelaFAO.Update("","TelaFAO");
            gvTelaFAO.BestFitColumns();
        }

       
    }
}
